package com.woniu.springbootshiro.mapper;

import com.woniu.springbootshiro.pojo.LampInfo;
import org.apache.ibatis.annotations.*;

import java.util.List;

@Mapper
public interface LampInfoMapper extends tk.mybatis.mapper.common.Mapper<LampInfo> {
  @Select("SELECT id,`check`,`name`,`type`,url,xy,low,light,oper,lampName,lampBand,insTime,A,V,`status`,`status01`,`x`,`y`,content,lampImg FROM lamp_info;")
  List<LampInfo> queryAllLamp();

  @Delete("delete from lamp_info where id=#{id}")
  int deleteOne(@Param("id") Integer id);

  @Select("SELECT id,`check`,`name`,`type`,url,xy,province,city,low,light,oper,lampName,lampBand,insTime,a,v,`status`,status01,`x`,`y`,content,lampImg  FROM lamp_info  WHERE  id = #{id}")
  LampInfo selectByPrimaryKey1(@Param("id") Integer id);
}
